package cn.gtlc.myUtils;

import java.io.IOException;
import java.io.RandomAccessFile;

/**
 * @Description TODO
 * @Author Jowin
 * @Date 2023/9/15
 * @Version -
 */
public class ReadFileByLine {
    public static void main(String[] args) {
        try {

            RandomAccessFile file = new RandomAccessFile("D:\\wwwroot\\idea-git\\src\\main\\java\\cn\\gtlc\\cardb_ddl_zhouwx-toMySql.sql", "r");
            String str = "";
            while ((str = file.readLine()) != null){
                if (str.contains("CREATE TABLE")){
                    System.out.println(str);
                }
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
